package com.itrencai.d1_static.demoextends;

public class Test {
    //创建子类对象，看是否可以使用父类的属性和行为
    public static void main(String[] args) {
        Student s=new Student();
        s.setName("西门");
        s.setAge(10);
        s.setClassname("二年级一班");
        System.out.println(s.getAge());
        System.out.println(s.getName());
        System.out.println(s.getClassname());
        s.problem();
        s.queryCourse();
        Teacher t=new Teacher();
        t.setName("西门");
        t.setAge(10);
        t.setDepartment("二年级教务组");
        System.out.println(t.getAge());
        System.out.println(t.getName());
        System.out.println(t.getDepartment());
        t.write();
        t.queryCourse();


    }

}
